system prompt
Evaluating KV-Cache Eviction Policies for LLM Agents: The Effect on the Shared System Prompt
Ampavatina, Hriday, Eirinaki, Magdalini
Large Language Model (LLM) agents run long sessions that all begin with the same system prompt, which holds the agent's instructions and the documentation of its tools. Serving engines store this shared prefix once for all sessions, so removing it from the key-value (KV) cache of one session frees no memory, but the session loses the documentation that the agent needs to call its tools. Published KV-cache eviction policies treat every cached token the same way against the memory budget, so they remove the shared prefix like any other text. In this paper, we measure seven published eviction policies on recorded sessions of SWE-agent, a coding agent, and we count the memory of each session the way a serving engine does, with the shared prefix counted once for all sessions. We test four models of the Qwen2.5 and Llama-3.1 families, with 1.5 to 14 billion parameters. When a session keeps an eighth of its cache, four of the policies, which choose tokens by attention or by position, keep at most 14% of the shared prefix, and the model can rarely recall how to call its tools. Under prefix caching, keeping the whole prefix costs no extra memory per session, and it lets the model recall its tool documentation in nearly every case. Keeping the prefix also improves how often the agent's next commands follow the command format documented in the system prompt by 10 to 22 percentage points on three models. For five of the six policies that we test on recall, it never significantly lowers the recall of facts from the session's own history (the part of its input after the shared prefix). Our results show that a serving engine with prefix caching can keep the shared prefix out of eviction at no memory cost, and that the agent then recalls its tool documentation and writes valid commands more often.
Agreement Is Not Fidelity: Auditing VLM Personas as a Synthetic Visual Audience
Pakdamansavoji, Sajjad, Fadaeinejad, Amin
Synthetic audiences, in which one vision-language model (VLM) answers many times as viewers described by short profiles, are proposed as stand-ins for people who judge and refine images. Agreement with a human panel does not show that the personas are faithful, because calibration, the composition of the scored panel, fixed group offsets, prompt wording and selection can each produce it. We audit a frozen Qwen2-VL-7B-Instruct audience whose cards are written from real raters' recorded profiles, rating photographs and paintings from three datasets with greedy decoding, and pair each kind of agreement with a comparator that could explain it. After identical held-out calibration on human ratings, a persona-free prompt predicts each photograph's mean rating more accurately than the persona prompt. The persona prompt is more accurate on paintings, where the prompts also differ, so this gain cannot be assigned to the cards alone. Across disjoint halves of each image's raters, predicted gaps between interest-in-art groups agree with the real gaps at 0.23 (uncentered correlation), but only at 0.03 once each group pair's average gap is removed, and on EVA the predicted gaps run opposite to the real ones. Attributes remain decodable from generated comments after card words are masked (AUC 0.58 to 0.70), even where ratings invert the real gap. As an image-editing critic, the audience shows no detected gain over a fixed instruction under the loop's own scorer (0.006, 95% interval -0.020 to 0.034) at 110 extra model calls per image. Aggregate accuracy, group gaps, persona language and editing gains thus support different kinds of validity, and we summarize the comparators as a checklist for population simulations.
Prompt Optimization Makes Reward Hacking Legible
Biddulph, Caleb, Carroll, Micah
Large language models (LLMs) trained with reinforcement learning (RL) often exhibit reward hacking, exploiting unintended loopholes in reward functions in ways that can be difficult to detect and eliminate. We propose using prompt optimization -- methods which increase an LLM's reward by updating its instructions rather than its weights -- to make learned strategies easier to monitor and edit. Applying the GEPA prompt optimizer to environments with exploitable reward functions, we find that optimized system prompts describe reward hacking strategies in highly interpretable language. Furthermore, by simply removing descriptions of unwanted behavior from the optimized system prompt at test time, we can improve the model's alignment while preserving legitimate performance gains. We show that prompt optimization can be guided with an RL-trained teacher LLM, combining the performance advantages of RL with the interpretability of prompting. Finally, we explore an approach to shorten optimized prompts, removing distracting and unhelpful instructions which would otherwise hinder interpretability. We hope that these insights about mitigating misalignment with prompt optimization will aid the discovery of unintended exploits in RL environments and the creation of predictable and monitorable AI systems.
FLIPS: Instance-Fingerprinting for LLMs via Pseudo-random Sequences
Richardeau, Gurvan, Dashyan, Gohar, Merrer, Erwan Le, Tredan, Gilles
Literature reveals that a Large Language Model's (LLM) behavior is not only conditioned by its original weights but also its instance-level parameters, such as instructional prompt, sampling configuration or quantization. A model that generates safe outputs under one configuration may produce toxic content under another. However, current LLM identification techniques (such as fingerprinting) focus on intellectual property protection, and their design favors robustness to changes in these instance-level parameters. This poses a critical challenge for AI regulation in which compliance assessments target actual deployed behaviors, not model provenance. In this paper, we introduce instance-level fingerprinting, a regulator-oriented paradigm that distinguishes configurations of the same LLM. Our method, FLIPS, exploits biases in generated binary random sequences. On a benchmark of 237 model instances, it identifies the instance with 77% accuracy from 32 queries to the target, against at most 33% for the adapted LLMmap baseline. Recognizing that a target is unseen, also called open-set challenge, is much harder. When 10% of instances are unseen, FLIPS realises a recall of 41% on the unseen instances, at a precision of 23%, i.e. more than twice better than random. Closed-set instance fingerprinting is thus practical with a few dozen queries, whereas the open-set setting remains an open problem. Code available at https://github.com/GurvanR/FLIPS-LLM-Instance-Fingerprinting.
Measuring Human-AI and AI-AI Teams in Multi-turn Layout Creation
Virdi, Rajvir Singh Naginder Singh, Pu, Yewen
Co-creating layouts such as websites and slides is a useful testbed for evaluating multi-turn instruction following of LLM systems. Since an intended layout's appearance cannot be well expressed in a single turn, the user must wait for the LLM to generate a layout then iteratively refine it with the LLM over multiple turns. We present a small-scale, exploratory (n=6) study of this multi-turn process to compare the differences of human-AI and AI-AI teams on the same layout-generation task. Given a reference wire-frame layout, a participant or a language model 'speaker' issues natural-language instructions to a fixed 'listener' LLM over multiple turns until the speaker is satisfied. Rather than an LLM as the judge, we fit a scoring function over geometric layout features using curated human preference data (n=19). We find that LLMs tend to encode the entire layout in the first turn, while humans iterate over many turns on average, writing much shorter instructions. We also find that human-AI teams consistently scored lower than AI-AI teams. This gap is driven by a limiter of human participants in specifying precise sizes and positions (e.g. 42 pixels to the right). Humans perform almost at par with language models on other features like ordering the elements into nested structures. We then perform interventions on the speaker LLMs to make them more human-like, and find it difficult. This raises the challenge of using LLMs as user models to evaluate multi-turn co-creation tasks.
Misalignment Between Educators' Testing and End Users' Behavior: What 17,000+ Chatbot Messages Reveal About AI Literacy Training for Teachers
Xiao, Ruiwei, Wang, Jiayi, Koyama, Miina, Wang, Yue, Xiao, Qing, Hou, Xinying, Bier, Norman, Stamper, John
AI literacy training for educators is expanding rapidly, but its effectiveness rests largely on self-report, knowledge tests, or interviews, revealing little about whether learning carries into practice or affects students and colleagues who use what educators build. We implemented AI for Learning, an asynchronous online course that trained 87 higher-education educators to recognize AI's capabilities, limitations, and ethics; apply prompt engineering; and evaluate AI outputs. Its central assignment asked educators to build, test, and voluntarily deploy chatbots for their practice on an educational chatbot authoring platform. Using LLM-assisted qualitative coding validated against human annotation, we analyzed the resulting 214 chatbots and their builder-bot, peer-bot, and end user-bot conversations, 17,000+ messages spanning 1.5 years. Educators 1) specified what bots should do more often than what they should not; 2) adopted templated prompt components but rarely untemplated strategies; and 3) tested routine use but seldom iterated, leaving 74% of end users' adversarial use untested. Still, 36 bots (17%) reached end users and 63 (29%) were adopted by peers. We contribute two successes and two lessons spanning the lifecycle of educator AI literacy training.
Agentic Harness Engineering: Observability-Driven Automatic Evolution of Coding-Agent Harnesses
Lin, Jiahang, Liu, Shichun, Pan, Chengjun, Lin, Lizhi, Dou, Shihan, Xi, Zhiheng, Huang, Xuanjing, Yan, Hang, Han, Zhenhua, Gui, Tao, Jiang, Yu-Gang
Harnesses are now central to coding-agent performance, mediating how models interact with tools and execution environments. Yet harness engineering remains a manual craft, because automating it faces a heterogeneous action space across editable components, voluminous trajectories that bury actionable signal, and edits whose effect is hard to attribute. We introduce Agentic Harness Engineering (AHE), a closed loop that addresses these challenges through three matched observability pillars: (1) component observability gives every editable harness component a file-level representation so the action space is explicit and revertible; (2) experience observability distills millions of raw trajectory tokens into a layered, drill-down evidence corpus that an evolving agent can actually consume; and (3) decision observability pairs every edit with a self-declared prediction, later verified against the next round's task-level outcomes. Together, these pillars turn every edit into a falsifiable contract, so harness evolution proceeds autonomously without collapsing into trial-and-error. Empirically, ten AHE iterations lift pass@1 on Terminal-Bench 2 from 69.7% to 77.0%, surpassing the human-designed harness Codex-CLI (71.9%) and the self-evolving baselines ACE and TF-GRPO. The frozen harness transfers without re-evolution: on SWE-bench-verified it tops aggregate success at 12% fewer tokens than the seed, and on Terminal-Bench 2 it yields +5.1 to +10.1pp cross-family gains across three alternate model families, indicating the evolved components encode general engineering experience rather than benchmark-specific tuning. Ablations localize the gain to tools, middleware, and long-term memory rather than the system prompt, suggesting factual harness structure transfers while prose-level strategy does not.
Harness-Zero: Harness Distillation via Agent-as-Harness
Ye, Haoran, Lu, Yuxing, Dong, Haonan, Su, Zhaochen, Song, Guojie
Agent harnesses, the external systems that mediate model-environment interaction, can substantially improve agent performance, but their gains remain tied to the harness at deployment. Because the best harness varies across domains, instances, and models, a general-purpose agent must either settle for a suboptimal shared harness or route among an ever-growing set of specialized ones. We therefore study agent harness distillation: using a domain- or instance-optimized harness as training-time guidance and transferring the behaviors it induces into model weights, so that its gains survive under a single fixed target harness. The challenge is that the two harnesses differ in action space and available information, so guidance from the optimized harness cannot serve directly as supervision for the target one. We introduce Harness-Zero, which enables harness distillation through agent-as-harness. Guided by the optimized harness, a harnessing agent corrects student responses before execution in the target harness's action space, turning harness guidance into training demonstrations. Fine-tuning on the resulting trajectories internalizes harness-induced behavior into the model, so the specialized harness can be removed at deployment. Our experiments spanning knowledge work, tool use, and science domains show that: (1) For frontier LLMs using the same evolved harness, agent-as-harness outperforms code-as-harness. (2) With the specialized harness removed at deployment, Harness-Zero improves the base model's macro-average task success from 23.3% to 44.3%, even exceeding the 41.7% it reaches with that harness still attached, while reducing inference token usage by 27%-86%. (3) Harness-Zero recovers harness-induced behaviors absent from the base model, with 82.3% average recovery across 28 patterns in the three domains.
PSM: Prompt Sensitivity Minimization via LLM-Guided Black-Box Optimization
Jawad, Hussein, Brunel, Nicolas J-B
System prompts are critical for guiding the behavior of Large Language Models (LLMs), yet they often contain proprietary logic or sensitive information, making them a prime target for extraction attacks. Adversarial queries can successfully elicit these hidden instructions, posing significant security and privacy risks. Existing defense mechanisms frequently rely on heuristics, incur substantial computational overhead, or are inapplicable to models accessed via black-box APIs. This paper introduces a novel framework for hardening system prompts through shield appending, a lightweight approach that adds a protective textual layer to the original prompt. Our core contribution is the formalization of prompt hardening as a utility-constrained optimization problem. We leverage an LLM-as-optimizer to search the space of possible SHIELDs, seeking to minimize a leakage metric derived from a suite of adversarial attacks, while simultaneously preserving task utility above a specified threshold, measured by semantic fidelity to baseline outputs. This black-box, optimization-driven methodology is lightweight and practical, requiring only API access to the target and optimizer LLMs. We demonstrate empirically that our optimized SHIELDs significantly reduce prompt leakage against a comprehensive set of extraction attacks, outperforming established baseline defenses without compromising the model's intended functionality. Our work presents a paradigm for developing robust, utility-aware defenses in the escalating landscape of LLM security. The code is made public on the following link: https://github.com/psm-defense/psm
SkillPE: Creativity-Oriented Cinematic Skill Evolution for Text-to-Video Prompt Enhancement
Huang, Yanwei, Zhu, Mingxuan, Li, Shujie, Liu, Shiyuan, Zhang, Yuanxing, Narechania, Arpit
Achieving high-quality cinematic text-to-video generation remains challenging for non-experts, whose prompts often lack professional narrative and creative design. Existing prompt enhancement (PE) methods and static cinematic skills offer limited capabilities for exploring diverse creative realizations. We propose SkillPE, a creativity-oriented PE framework that systematically evolves reusable cinematic skills through reference-guided exploration. Starting from expert-provided cinematic knowledge, SkillPE initializes and normalizes 20 structured seed skills. It then retrieves movie references categorized as resonators (good matches), dissonants (weak matches), and divergents (creatively inspiring near-misses). Resonators and dissonants refine skill applicability and execution, while divergents inspire alternative cinematic realizations through controlled mutations that preserve user intent. Candidate skills are assessed through generated videos along prompt fidelity, cinematic quality, narrative appeal, and creativity to construct the final skill libraries. Experiments on StoryEval and VBench demonstrate improvements of up to 1.10 points over seed skills and 1.02 points over the strongest external baseline on a 7-point four-dimensional evaluation scale. Overall, SkillPE offers a practical approach to balancing fidelity and creativity in cinematic text-to-video generation.